import request from '@/utils/request'
import { ApiModulesRoutes } from '../../consts.js'

/**
 * 查询角色列表
 * @param {Number} data.pageNo
 * @param {Number} data.pageSize
 * @param {String} data.keyword
 */
export async function apiGetRoleList(data) {
  const url = `${ApiModulesRoutes.USER}/role/findRolePageByParam`
  return await request.post(url, data)
}

/**
 * 获取所有角色(关键字查询功能)
 * @param {String} keyword
 */

export function findRoleListByParam(keyword) {
  return request({
    url: `${ApiModulesRoutes.USER}/role/findRoleListByParam`,
    method: 'POST ',
    data: { keyword },
  })
}
